package slim3.controller.admin;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.util.RequestMap;

import slim3.meta.PostMeta;
import slim3.service.PostService;

public class UpdateController extends Controller {
    
    private PostService service = new PostService();

    private PostMeta meta = PostMeta.get();
    
    @Override
    public Navigation run() throws Exception {
        service.update(asKey(meta.key), asLong(meta.version), new RequestMap(request));
        return redirect("../result.html");
    }
}
